import { request } from '@/utils/request.js'

export default {
	/**
	 * 获取验证码
	 * @returns
	 */
	getCaptch() {
		return request({
			url: '/p5wznrna/verify',
			method: 'get',
			headers:{
				'Accept':'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8'
			}
		})
	},

	/**
	 * 用户登录
	 * @param {object} params
	 * @returns
	 */
	login(data={}) {
		return request({
			url: "/p5wznrna/login",
			method: 'post',
			data: data,
		})
	},

	/**
	 * 用户退出
	 * @param {object} params
	 * @returns
	 */
	logout(params = {}) {
		return request({
			url: '/p5wznrna/loginout',
			method: 'get',
			params: params,
		})
	},
}
